<?php
/**
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-25 11:30:36
 * @lastTime 2020-05-01 23:01:08
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */

namespace Design\Structural\Facade;

class Facade
{

    private $os;

    private $bios;


    public function __construct(OperatingSystem $os, Bios $bios)
    {
        $this->os   = $os;
        $this->bios = $bios;

    }//end __construct()


    public function turnOn()
    {
        $this->bios->execute();
        $this->bios->waitForKeyPress();
        $this->bios->lanch($this->os);

    }//end turnOn()


    public function turnOff()
    {
        $this->os->halt();
        $this->bios->powerDown();

    }//end turnOff()


}//end class
